home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // illustrates use of ANI.AWK to animate two balls
- // first ball drops from right of view, bounces up to left
- // second ball follows the first with a time delay
- //
- #include "shapes.inc"
- #include "colors.inc"
- #include "textures.inc"
-
- #declare xlook=0
- #declare lrot=0
- #declare xview=0
- #declare zview= -180
-
- #include "delay.inc"
-
- camera {
- location <xview 30.0 zview>
- up <0.0 1.0 0.0>
- right <1.333 0.0 0.0>
- look_at <xlook 40.0 0.0>
- }
- object {
- light_source {< 0 80 -180 >
- colour White
- }
- }
-
- object {
- sphere { <x1 y1 -30> 5 }
- texture {
- reflection .1
- color Magenta
- }
- // move up to allow for ball diameter
- translate < 0 5 0>
- }
-
- object {
- sphere { <x2 y2 -30> 5 }
- texture {
- reflection .1
- color Red
- }
- // move up to allow for ball diameter
- translate < 0 5 0>
- }
-
-
- object {
- plane { <0.0 1.0 0.0> 0.0 }
-
- texture {
- checker color White color Red
- reflection 0.2
- scale <15.0 15.0 15.0>
- }
- }
-
- object { /* Sky stolen from "chess.dat" */
- sphere { <0 -39000 0> 40000 inverse }
-
- texture {
- bozo
- turbulence 0.6
- colour_map {
- [0 0.5 colour red 0.4 green 0.5 blue 1
- colour red 0.4 green 0.5 blue 1.0]
- [0.5 0.7 colour red 0.4 green 0.5 blue 1
- colour red 1 green 1 blue 1.0]
- [0.7 1 colour red 1 green 1 blue 1
- colour red 0.7 green 0.7 blue 0.7]
- }
- scale <500 500 500>
- ambient 1
- diffuse 0
- }
-
- colour red 0.4 green 0.5 blue 1
- }
-
-